package com.boot.ch7.exception;

/**
 * @author onlyone
 */
public class ServiceException extends RuntimeException {


    public String             errorCode;                              // 错误码
    public String             errorMsg;                               // 错误信息
    public String             extStatus;                              // 协议级错误码控制，如 http 404 错误等，各个协议需要自己处理

    public ServiceException(String errorCode, String errorMsg){
        super(errorMsg);

        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public ServiceException(String errorCode, String errorMsg, Throwable cause){
        super(errorMsg, cause);

        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public ServiceException(Throwable cause){
        super(cause);
    }

}
